#coding:utf-8
import smtplib
from email.mime.text import MIMEText
from email.header import Header

sender = '114975541@qq.com'
receiver = '114975541@qq.com'
subject = '测试'
username = '114975541@qq.com'
password = 'lichunxue'

msg = MIMEText('这是在测试呢',_subtype='plain',_charset='utf-8')
msg['Subject'] = Header(subject,'utf-8')
smtp = smtplib.SMTP("smtp.qq.com")
smtp.login(username,password)
smtp.sendmail(sender,receiver,msg.as_string())
smtp.quit()
